home *** CD-ROM | disk | FTP | other *** search
/ DOS Vuser Deluxe 2003 October / DOS Vuser Deluxe 2003 Oct - Disc 1.iso / SKIN / Soaked.wmz / Soaked.js < prev    next >
Text File  |  2002-07-30  |  8KB  |  304 lines

  1. /*
  2.     skin & code by chris brenz @ Next In Line
  3.     chris@nextinline.com
  4.     http://www.nextinline.com/
  5.     http://www.nextinline.com/chris/
  6. */
  7.  
  8. var rndSeed;
  9. var lastMoved = "move1";
  10. var move1x;
  11. var move1y;
  12. var move1x_sm;
  13. var move1y_sm;
  14. var speed1 = 1500;
  15. var speed2 = 1000;
  16. var speed3 = 2000;
  17. var speed4 = 1200;
  18. var speed5 = 1750;
  19. var unLocked = false;
  20. var moveToggle = "true";
  21. var vidIsRunning = false;
  22. var showViz = true;
  23. var iAmLarge = true;
  24.  
  25. function onLoad() {
  26.     openStateChange();
  27.     playStateChange();
  28.     vidIsRunning ? StartVideo() : EndVideo();
  29. }
  30.  
  31. function openStateChange() {
  32.     vidIsRunning = (player.openState==osMediaOpen) &&
  33.         (player.currentMedia.ImageSourceWidth>0);
  34. }
  35.  
  36. function playStateChange() {
  37.     vidIsRunning = (player.openState==osMediaOpen) &&
  38.         (player.currentMedia.ImageSourceWidth>0);
  39. }
  40.  
  41. function StartVideo() {
  42.     if (iAmLarge == false) {
  43.         goLarge();
  44.     }
  45.     topLeftPane.moveto(0,0,500);
  46.     showViz = false;
  47. }
  48.  
  49. function EndVideo() {
  50.     hideTopLeft();
  51. }
  52.  
  53. function moveBob() {
  54.     if (iAmLarge == true) {
  55.             move1x = 202 + (Math.floor(Math.random()*220));        
  56.             move1y = 3 + (Math.floor(Math.random()*309));
  57.             move1.moveTo(move1x, move1y, speed1);
  58.             move2.moveTo(move1x, move1y, speed2);
  59.             move3.moveTo(move1x, move1y, speed3);    
  60.             if (unLocked == true) {
  61.                     move4.moveTo(move1x, move1y, speed4);
  62.                     move5.moveTo(move1x, move1y, speed5);
  63.             }
  64.         } else {
  65.             move1x_sm = 264 + (Math.floor(Math.random()*164));        
  66.             move1y_sm = 1 + (Math.floor(Math.random()*39));
  67.             move1_sm.moveTo(move1x_sm, move1y_sm, speed1);
  68.             move2_sm.moveTo(move1x_sm, move1y_sm, speed2);
  69.             move3_sm.moveTo(move1x_sm, move1y_sm, speed3);    
  70.             if (unLocked == true) {
  71.                     move4_sm.moveTo(move1x_sm, move1y_sm, speed4);
  72.                     move5_sm.moveTo(move1x_sm, move1y_sm, speed5);
  73.             }
  74.     }
  75.     
  76. }
  77.  
  78. function bobToggle() {
  79.     if ((iAmLarge == true) && (event.x > 211)) {                                // only do this when Bob is large
  80.         move1x = event.x - 11;
  81.         move1y = event.y - 11;
  82.         move1.moveTo(move1x, move1y, speed1);
  83.         move2.moveTo(move1x, move1y, speed2);
  84.         move3.moveTo(move1x, move1y, speed3);
  85.         if (unLocked == true) {
  86.             move4.moveTo(move1x, move1y, speed4);
  87.             move5.moveTo(move1x, move1y, speed5);
  88.         }    
  89.         
  90.     }
  91. }
  92.  
  93. function showTopLeft() {
  94.     showViz = true;
  95.     topLeftPane.moveto(0,0,500);
  96. }
  97.  
  98. function afterTopMove() {
  99.     if (iAmLarge == true) {
  100.         if (vidIsRunning == false) {
  101.             if (showViz == true) {
  102.             closeEffectsText.visible = true;
  103.              }
  104.             myeffects.enabled = true;
  105.             myeffects.visible = true;
  106.             myvideo.visible = false;
  107.         } else {
  108.             myvideo.visible = true;
  109.             myeffects.enabled = false;
  110.             myeffects.visible = false;
  111.             closeEffectsText.visible = false;
  112.         }
  113.     }
  114. }
  115.  
  116. function hideTopLeft() {
  117.     myeffects.enabled = false;
  118.     myeffects.visible = false;
  119.     myvideo.visible = false;
  120.     showViz = false;
  121.     closeEffectsText.visible = false;
  122.     topLeftPane.moveto(200,0,500);
  123. }
  124.  
  125. function showBotLeft(whichCrap) {
  126.     switch(whichCrap) {
  127.         case "audio":
  128.             playlistcontrol.visible = false;
  129.             playlistView.moveto(200,167,500);
  130.             plButton.upToolTip="View Playlist";
  131.             creditsText.visible = false;
  132.             creditsView.zindex = "-1"
  133.             creditsView.moveto(200,167,500);
  134.             if (audioView.left == 200) {
  135.             audioButton.upToolTip="Hide Audio Controls";
  136.             audioView.moveto(0,167,500);
  137.             audioView.visible = true;
  138.             } else {
  139.             audioControls.visible = false;
  140.             audioButton.upToolTip="Display Audio Controls";
  141.             audioView.zindex = "-1"
  142.             audioView.moveto(200,167,500);
  143.             }
  144.             break;
  145.         case "thePlaylist":
  146.             audioControls.visible = false;
  147.             audioView.zindex = "-1"
  148.             audioView.moveto(200,167,500);
  149.             audioButton.upToolTip="Display Audio Controls";
  150.             creditsText.visible = false;
  151.             creditsView.zindex = "-1"
  152.             creditsView.moveto(200,167,500);
  153.             if (playlistView.left == 200) {
  154.             plButton.upToolTip="Hide Playlist";
  155.             playlistView.moveto(0,167,500);
  156.             playlistView.visible = true;
  157.             } else {
  158.             playlistcontrol.visible = false;
  159.             plButton.upToolTip="View Playlist";
  160.             playlistView.moveto(200,167,500);
  161.             }
  162.             break;
  163.         case "credits":
  164.             audioControls.visible = false;
  165.             audioView.zindex = "-1"
  166.             audioView.moveto(200,167,500);
  167.             audioButton.upToolTip="Display Audio Controls";
  168.             playlistcontrol.visible = false;
  169.             playlistView.moveto(200,167,500);
  170.             plButton.upToolTip="View Playlist";
  171.             if (creditsView.left == 200) {
  172.             creditsView.moveto(0,167,500);
  173.             creditsView.visible = true;
  174.             } else {
  175.             creditsText.visible = false;
  176.             creditsView.zindex = "-1"
  177.             creditsView.moveto(200,167,500);
  178.             }
  179.             break;
  180.     }
  181. }
  182.  
  183. function showPL() {
  184.     if (playlistView.left == 0) {
  185.         playlistcontrol.visible = true;
  186.     }
  187. }
  188.  
  189. function showAC() {
  190.     if (audioView.left == 0) {
  191.         audioControls.visible = true;
  192.         audioView.zindex = "0"
  193.     }
  194. }
  195.  
  196. function showCR() {
  197.     if (creditsView.left == 0) {
  198.         creditsText.visible = true;
  199.         creditsView.zindex = "0"
  200.     }
  201. }
  202.  
  203. function getSmall() {
  204.     iAmLarge = false;
  205.     hideTopLeft();
  206.     seekerBack.visible = false;
  207.     myProgress.visible = false;
  208.     if (audioView.left == 0) {
  209.         audioControls.visible = false;
  210.         audioButton.upToolTip="Display Audio Controls";
  211.         audioView.zindex = "-1"
  212.         audioView.moveto(200,167,500);
  213.     }
  214.     if (playlistView.left == 0) {
  215.         playlistcontrol.visible = false;
  216.         plButton.upToolTip="View Playlist";
  217.         playlistView.moveto(200,167,500);
  218.     }
  219.     if (creditsView.left == 0) {
  220.         creditsText.visible = false;
  221.         creditsView.zindex = "-1"
  222.         creditsView.moveto(200,167,500);
  223.     }
  224.     move1.visible = false;
  225.     move2.visible = false;
  226.     move3.visible = false;
  227.     move4.visible = false;
  228.     move5.visible = false;
  229.     bigSubView.visible = false;
  230.     miniView.visible = true;
  231.     view.height="55"
  232.     titleArea.visible = false;
  233.     topLeftPane.visible = false;
  234.     closeEffectsText.visible = false;
  235.     move1_sm.visible = true;
  236.     move2_sm.visible = true;
  237.     move3_sm.visible = true;
  238.     move4_sm.visible = true;
  239.     move5_sm.visible = true;
  240. }
  241.  
  242. function goLarge() {
  243.     move1_sm.visible = false;
  244.     move2_sm.visible = false;
  245.     move3_sm.visible = false;
  246.     move4_sm.visible = false;
  247.     move5_sm.visible = false;
  248.     miniCredits.visible = false;
  249.     smallCred.upToolTip="Show Small Credits";
  250.     miniPane.zindex="-1"
  251.     miniPane.moveto(263,3,250);
  252.     miniView.visible = false;
  253.     bigSubView.visible = true;
  254.     view.height="332"
  255.     move1.visible = true;
  256.     move2.visible = true;
  257.     move3.visible = true;
  258.     move4.visible = true;
  259.     move5.visible = true;
  260.     topLeftPane.visible = true;
  261.     titleArea.visible = true;
  262.     seekerBack.visible = true;
  263.     myProgress.visible = true;
  264.     showTopLeft();
  265.     iAmLarge = true;
  266.     randomImage.backgroundImage="blank.png";
  267.     randomImage.backgroundImage="jump_splash2.gif";
  268. }
  269.  
  270. function showSmallCredits() {
  271.     if (miniPane.left == 126) {
  272.         miniCredits.visible = true;
  273.         miniPane.zindex = "0"
  274.     }
  275. }
  276.  
  277. function doMiniPane() {
  278.     if (miniPane.left == 263) {
  279.         smallCred.upToolTip="Hide Small Credits";
  280.         miniPane.moveto(126,3,250);
  281.         } else {
  282.         miniCredits.visible = false;
  283.         smallCred.upToolTip="Show Small Credits";
  284.         miniPane.zindex="-1"
  285.         miniPane.moveto(263,3,250);
  286.         }
  287. }
  288.  
  289. function changeSpline() {
  290.     eq.enableSplineTension = !eq.enableSplineTension;
  291.     if (eq.enableSplineTension == false) {
  292.         theSplineButton.image="eq_spline_off.png";
  293.         theSplineButton.upToolTip = "Enable Tension";
  294.     } else {
  295.         theSplineButton.image="eq_spline_on.png";
  296.         theSplineButton.upToolTip = "Disable Tension";
  297.     }
  298. }
  299.  
  300. function setTimerValue(newSpeed) {
  301.     myDefault.timerInterval = newSpeed*1000;
  302. }
  303.  
  304.